// 获取某天开始至今的幅度，包括开始那天，不建议使用
exports.getStockRate = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getStockRate(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getTradingDays = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getTradingDays(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getLastTradingDay = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getLastTradingDay(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getStockTodayTenxun = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getStockTodayTenxun(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getStockAllTenxun = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getStockAllTenxun(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getStockTodayDongfang = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getStockTodayDongfang(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getStockAllDongfang = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getStockAllDongfang(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.updateXueQiuCookie = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.updateXueQiuCookie(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getStockTodayXueqiu = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getStockTodayXueqiu(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getStockAllXueqiu = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getStockAllXueqiu(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getBtbKlines = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getBtbKlines()
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getETHKlines = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getETHKlines()
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}
exports.getDOGEKlines = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getDOGEKlines()
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}
exports.getBNBKlines = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getBNBKlines()
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getBIKlines = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getBIKlines(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getBIHTKlines = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getBIHTKlines(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}

exports.getBIBTKlines = async function (ctx) {
  try {
    const res = await ctx.services.stockApi.getBIBTKlines(ctx.query)
    ctx.body = ctx.resuccess(res)
  } catch (err) {
    ctx.body = ctx.refail(err)
  }
}
